With the development of cloud computing, the computer virtualization technology, as one of the basic technologies of the cloud computing, is also developing gradually, and can share a Central Processing Unit (CPU), a hard disk, a memory and other resources by operating a plurality of virtual machines on one server, which thus saves the hardware investment of an enterprise on a computer and is one of the evolution directions of the virtualization technology.
The excessive distribution of memory is a memory distribution technology, by which virtual memory can be distributed to a plurality of virtual machines in a server, and the sum of memory that respective virtual machines are aware of exceeds the actual amount of physical memory of the server. According to different implementation mechanisms, the main technologies for excessive distribution of memory are as follows:
a balloon driving technology: by this technology, the memory that each virtual machine is aware of is more than the memory actually distributed; a balloon driver is utilized on the virtual machine to occupy the excessively-distributed memory to prevent the excessively-distributed memory from not being distributed to other programs in the virtual machine; and when the memory of the programs of the virtual machine is insufficient, a virtual machine operating system may start a memory page switch mechanism in the range of the virtual machine automatically;
a virtual machine manager page switch technology: after the memory page of the virtual machine is distributed completely, a virtual machine manager saves part of memory pages to a disk, so as to release some memory for the virtual machine to utilize, to make a virtual machine user not be aware of the excessive distribution of the memory; and
a page sharing technology: based on a page, the pages with same content in different virtual machines are mapped to a same physical page.
In the technologies above, the probability of insufficiency of memory is high in the balloon driving technology, so the experience of the virtual machine user is very poor; while in the virtual machine manager page switch technology, the virtual machine user may not be aware of the insufficiency of memory, so the experience of the virtual machine user is better in comparison with the balloon driving technology, whereas, in an actual running process, the running performance of the virtual machine manager page switch technology is poorer than that in the balloon driving technology, so the efficiency and accuracy achieved by utilizing a virtual machine manager for page switch are lower than that achieved by utilizing a virtual machine operating system for page switch, therefore, the page sharing technology becomes the best one in the technologies above, this is because the memory distributed by the page sharing technology is that actually existing, and such problems as performance reduction and poor user experience are avoided.
At present, the transparent page sharing function provided by the VMware company and the kernel same page combining function provided by the Linux kernel company both are page sharing technology. The page sharing technology has many advantages but also has the following defects: its sharing effect highly depends on the similarity of running software of the virtual machines, namely, the higher the similarity of running software of two virtual machines is, the more pages they can share, and the better the effect of excessive distribution of memory is; on the contrary, the lower the similarity of running software of two virtual machines is, the fewer pages they can share, and the poorer the effect of excessive distribution of memory is. Therefore, for a large server cluster system, if the similarity of software of virtual machines on each server is not high, the effect of excessive distribution of memory of the whole cluster system is poor, so that memory resources are wasted and a fewer number of virtual machines run in the system.